package tan.dft.listviewlotrinh;

import android.os.Parcel;
import android.os.Parcelable;

public class Lotrinh implements Parcelable {

	private int thoigian, idmayql, idmay;
	private String date;
	private Double lat, lng;

	public Lotrinh(int idmayql, int idmay, String date, Double lat, Double lng,
			int thoigian) {
		super();
		this.idmayql = idmayql;
		this.idmay = idmay;
		this.date = date;
		this.lat = lat;
		this.lng = lng;
		this.thoigian = thoigian;
	}

	public Lotrinh(Parcel in) {
		idmayql = in.readInt();
		idmay = in.readInt();
		date = in.readString();
		lat = in.readDouble();
		lng = in.readDouble();
		thoigian = in.readInt();
	}

	public int getThoigian() {
		return thoigian;
	}

	public void setThoigian(int thoigian) {
		this.thoigian = thoigian;
	}

	public int getIdmayql() {
		return idmayql;
	}

	public void setIdmayql(int idmayql) {
		this.idmayql = idmayql;
	}

	public int getIdmay() {
		return idmay;
	}

	public void setIdmay(int idmay) {
		this.idmay = idmay;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLng() {
		return lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	public static Parcelable.Creator<Lotrinh> getCreator() {
		return CREATOR;
	}

	public static final Parcelable.Creator<Lotrinh> CREATOR = new Parcelable.Creator<Lotrinh>() {
		public Lotrinh createFromParcel(Parcel in) {
			return new Lotrinh(in);
		}

		public Lotrinh[] newArray(int size) {
			return new Lotrinh[size];
		}
	};

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(idmayql);
		dest.writeInt(idmay);
		dest.writeString(date);
		dest.writeDouble(lat);
		dest.writeDouble(lng);
		dest.writeInt(thoigian);

	}

}
